module.exports = function (error) {

	console.log(error)

	/**
	 * Error ? String ? output And Response
	 * Error ? Object ? Error.name || 'undefined' 
	 * Other ? Console
	 */
	if (error === null) {
		global.logger.error('捕获到错误信息为null')

		return ('错误返回为null:未知的错误')
	}
	else if (typeof (error) === 'object') {
		const errorName = error.name || '未知的ErrorName'
		const errorMessage = error.message || '未知的ErrorMessage'
		const catchedError = `异常信息 : ${errorName}; 异常内容 : ${errorMessage}`

		// global.logger.error(catchedError)

		return (catchedError)
	}
	else if (typeof (error) === 'string') {
		const catchedError = `${error}`

		global.logger.error(catchedError)

		return (catchedError)
	}
	else {
		const catchedError = error

		// global.logger.error(catchedError)

		return (catchedError)
	}
}
